
#if !SILVERLIGHT
using QdbUnit;
using QdbUnit.Extensions;
using Qdb.Ext;
using Qdb.Query;
using Qdb.Tests.Common.Concurrency;

namespace Qdb.Tests.Common.Concurrency
{
	public class QueryNonExistantTestCase : QdbClientServerTestCase
	{
		public static void Main(string[] args)
		{
			new Qdb.Tests.Common.Concurrency.QueryNonExistantTestCase().RunConcurrency
				();
		}

		internal QueryNonExistantTestCase.QueryNonExistant1 member;

		public QueryNonExistantTestCase()
		{
		}

		public QueryNonExistantTestCase(bool createMembers)
		{
			// qdb constructor
			member = new QueryNonExistantTestCase.QueryNonExistant1();
			member.member = new QueryNonExistantTestCase.QueryNonExistant2();
			member.member.member = this;
		}

		// qdb constructor
		public virtual void Conc(IExtObjectContainer oc)
		{
			oc.QueryByExample((new Qdb.Tests.Common.Concurrency.QueryNonExistantTestCase
				(true)));
			AssertOccurrences(oc, typeof(Qdb.Tests.Common.Concurrency.QueryNonExistantTestCase
				), 0);
			IQuery q = oc.Query();
			q.Constrain(new Qdb.Tests.Common.Concurrency.QueryNonExistantTestCase
				(true));
			Assert.AreEqual(0, q.Execute().Count);
		}

		public class QueryNonExistant1
		{
			internal QueryNonExistantTestCase.QueryNonExistant2 member;
		}

		public class QueryNonExistant2 : QueryNonExistantTestCase.QueryNonExistant1
		{
			internal QueryNonExistantTestCase member;
		}
	}
}
#endif // !SILVERLIGHT
